package com.example.loginmvvm.utils

import android.content.Context

/*
 * class title: 
 * Author by RenChunLin, Email 18957806320@163.com, Date on 2021/4/22.
 * PS: Not easy to write code, please indicate.
 */
object SizeUtils {
    fun dip2px(context: Context, dpValue: Float): Int {
        val scale: Float = context.resources.displayMetrics.density
        return (dpValue * scale + 0.5f).toInt()
    }
}